<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var name = "itbaizhan";
        var result1 = name.substr(2,7);
        console.log(result1);
        
        var result2 = name.substr(2);
        console.log(result2);

        var hello = "my name is iwen";
        console.log(hello.substr(-11));
        console.log(hello.substr(2,-1));//2 0
        
        




    </script>
</body>
</html>